import { KEYCONST } from "./enums";
var _process_env_DEV_CHAIN;
// export let isDevChain =
//   process.env.NODE_ENV === 'development' ||
//   ['development', 'test'].includes(process.env.ENV || ''); // 开发环境
// const argv = process.argv.slice(2)
// const isTestChain = argv.indexOf('--devChain') !== -1
export var isDevChain = (_process_env_DEV_CHAIN = process.env.DEV_CHAIN) !== null && _process_env_DEV_CHAIN !== void 0 ? _process_env_DEV_CHAIN : false;
export var isDomesticVersion = JSON.parse(localStorage.getItem(KEYCONST.domestic) || "false");
/** 切换国内外版本 */ export var switchDomesticVersion = function(domestic) {
    isDomesticVersion = domestic;
};
export var changeEnv = function(newisDevChain) {
    isDevChain = newisDevChain;
};
/** 开发环境 */ var DEV = "https://dev-ona-web-h5.ona.social/api";
// const DEV = 'https://www.ona.social/api';
/** 预生产 */ var PRE_PROD = "https://pre-ona-web-h5.ona.social/api";
/** 测试 */ var RES = "https://test-ona-web-h5.ona.social/api";
/** 生产 */ var PROD = "https://www.ona.social/api";
/** 预生产2 */ var PRE_PROD2 = "https://pre-ona-web-h5-new.ona.social/api";
var ENV_MAP = {
    development: DEV,
    test: RES,
    production: PROD,
    pre: PRE_PROD,
    pre2: PRE_PROD2
};
var H5_DOMAIN_MAP = {
    development: "dev-ona-web-h5.ona.social",
    test: "dev-ona-web-h5.ona.social",
    production: "www.ona.social",
    pre: "pre-ona-web-h5.ona.social",
    // voc
    pre2: "pre-ona-web-h5-new.ona.social" // ona 本身
};
/** BSC 链 */ export var BSC = [
    "bnb",
    "bnbTest"
];
/** 以太坊链 */ export var ETHEREUM = [
    "ethereum",
    "ethereumGoerli"
];
/** conflux链 */ export var CONFLUX = [
    "cfx",
    "cfxTest"
];
/** 测试链 */ export var TEST_CHAIN = [
    "ethereumGoerli",
    "bnbTest",
    "cfxTest"
];
/** 正式链 */ export var MAIN_CHAIN = [
    "bnb",
    "ethereum",
    "cfx"
];
export var CHAINMAPTOSERVE = {
    bnb: "BSC",
    bnbTest: "BSC",
    ethereum: "ETHEREUM",
    ethereumGoerli: "ETHEREUM",
    cfx: "CONFLUX",
    cfxTest: "CONFLUX"
};
export var CHAIN_MAP = {
    BSC: BSC,
    ETHEREUM: ETHEREUM,
    CONFLUX: CONFLUX
};
var envKey = process.env.ENV || process.env.REACT_APP_ENV;
var nodeEvnKey = "production";
export default {
    // api_service: 'http://8.219.111.81:9001', //测试地址/
    // api_service: 'https://lb-ops.kingswallet.io', //正式地址/
    // shareurl: "http://18.140.40.39:8080",
    timeout: 30000,
    uploadURL: "http://87.118.118.98:10000/post.file.up",
    api_service: "api",
    wallet_api_service: ENV_MAP[envKey || nodeEvnKey || "production"] || PROD,
    h5_domain: H5_DOMAIN_MAP[envKey || nodeEvnKey || "production"] || PROD
};
export var POLLING_INTERVAL = 1000 * 60;

 //# sourceMappingURL=config.js.map